<!doctype html>
<html class="x-admin-sm">
<head>
    <meta charset="UTF-8">
    <title>后台管理系统</title>
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8"/>
    <meta http-equiv="Cache-Control" content="no-siteapp"/>
    <link rel="stylesheet" href="../Xadmin/css/font.css">
    <script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
    <link rel="stylesheet" href="../Xadmin/css/xadmin.css">
    <!-- <link rel="stylesheet" href="./css/theme5.css"> -->
    <script src="../layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript" src="../Xadmin/js/xadmin.js"></script>
    <!-- 让IE8/9支持媒体查询，从而兼容栅格 -->
    <!--[if lt IE 9]>
    <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
    <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
    <script>
        var is_remember = false;
    </script>
</head>
<body>

<table class="layui-hide" id="BookName" lay-filter="BookName"></table>

<script src="../layui/layui.js" charset="utf-8"></script>
<!-- 注意：如果你直接复制所有代码到本地，上述 JS 路径需要改成你本地的 -->
<script src="../layui/tool.js"></script>
<script>
    var baseUrl = "http://127.0.0.1:8081/UserIntegral/GetPaiH"
    layui.use('layer', function () {
        console.log('layer导入成功！')
    })
    layui.use('table', function () {//导入table
        var table = layui.table;
        var $ = layui.jquery
        table.render({//生成渲染表格
            elem: '#BookName'//表格id
            , url: baseUrl//请求地址
            , toolbar: "#MessageToolbar"//头部工具栏
            , where: {//查询条件

            }
            , defaultToolbar: ['filter', 'exports', 'print', {
                title: "提示"
                , layEvent: 'LAYTABLE_TIPS'
                , icon: 'layui-icon-tips'
            }]//表格的头部工具栏
            , title: '邮件列表' //表格标题
            , cols: [[//字段
                {
                    type: 'radio', fixed: 'left' //左对齐的单选框
                },
                {field: 'uname', title: '用户名', width: 160, fixed: 'left'}
                , {field: 'avatar', title: '头像',height:160, width: 160, fixed: 'left',templet: '<div><img src="{{d.avatar}}" width="100%" height="100%"></div>>'}
                , {field: 'fraction', title: '用户总积分', width: 200, fixed: 'left'}
            ]]
            , page: true//是否分页
            , limit: 10//每页数量
        });
        //头部工具栏
        table.on('toolbar(BookName)', function (obj) {

        })
    })


</script>
</body>

</html>